<html>
<head><meta charset="utf-8"><title>Future of save-analysis · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html">Future of save-analysis</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213225533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213225533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213225533">(Oct 13 2020 at 22:34)</a>:</h4>
<p>Is save-analysis likely to be removed once we stop shipping RLS?</p>



<a name="213225584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213225584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213225584">(Oct 13 2020 at 22:35)</a>:</h4>
<p>I ask because someone built a <a href="https://kythe.io/">Kythe</a> indexer for Rust, which uses save-analysis</p>



<a name="213225676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213225676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213225676">(Oct 13 2020 at 22:36)</a>:</h4>
<p>not what I would have done personally, but unless they were willing to put significant work into libraryification, it's not like there are many other options available</p>



<a name="213225746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213225746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213225746">(Oct 13 2020 at 22:37)</a>:</h4>
<p>so I'm wondering what kind of future save-analysis has, if it's a maintenance burden we'd like to get rid of, etc.</p>



<a name="213236164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236164">(Oct 14 2020 at 00:58)</a>:</h4>
<p>I don't think it's a major burden, but it's also likely to be incomplete</p>



<a name="213236180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236180">(Oct 14 2020 at 00:59)</a>:</h4>
<p>I think it needs to get updated to include new-ish things</p>



<a name="213236392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236392">(Oct 14 2020 at 01:02)</a>:</h4>
<p>hmm. so if the kythe team were willing to update it as needed, would we be willing to keep it around?</p>



<a name="213236437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236437">(Oct 14 2020 at 01:03)</a>:</h4>
<p>I'm trying to decide if I need to push them toward developing another solution</p>



<a name="213236518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236518">(Oct 14 2020 at 01:05)</a>:</h4>
<p>save-analysis is unstable anyway, right? Is there any reason not to use HIR?</p>



<a name="213236526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236526">(Oct 14 2020 at 01:05)</a>:</h4>
<p>if it hasn't been written yet</p>



<a name="213236528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236528">(Oct 14 2020 at 01:05)</a>:</h4>
<p>they're very different in terms of access</p>



<a name="213236551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236551">(Oct 14 2020 at 01:05)</a>:</h4>
<blockquote>
<p>I'm trying to decide if I need to push them toward developing another solution</p>
</blockquote>
<p>before, say, fuchsia were to start using kythe for code navigation on <a href="https://cs.opensource.google/fuchsia/fuchsia">codesearch</a></p>



<a name="213236604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236604">(Oct 14 2020 at 01:06)</a>:</h4>
<p>like, HIR is very unstable, save-analysis is maybe stale but mostly stable</p>



<a name="213236607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236607">(Oct 14 2020 at 01:06)</a>:</h4>
<p>(and save-analysis is just JSON exports)</p>



<a name="213236610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236610">(Oct 14 2020 at 01:06)</a>:</h4>
<blockquote>
<p>if it hasn't been written yet</p>
</blockquote>
<p>well, part of the problem is it <em>has</em> been written =)</p>



<a name="213236615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236615">(Oct 14 2020 at 01:06)</a>:</h4>
<p>I see</p>



<a name="213236618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236618">(Oct 14 2020 at 01:06)</a>:</h4>
<p>but so far I'm considering that a "demo"</p>



<a name="213236621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236621">(Oct 14 2020 at 01:06)</a>:</h4>
<p>I think we've wanted to remove it before, but I do not think that was because of some high maintenance burden</p>



<a name="213236632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236632">(Oct 14 2020 at 01:07)</a>:</h4>
<p>that said, I would not personally rely on it for things you <em>need</em> correctness in (e.g., code correctness lints)</p>



<a name="213236641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236641">(Oct 14 2020 at 01:07)</a>:</h4>
<p>but things like search it feels more or less fine</p>



<a name="213236651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236651">(Oct 14 2020 at 01:07)</a>:</h4>
<p>depending on what you need, looking at rustdoc's potential JSON output (not yet implemented) might be better</p>



<a name="213236659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236659">(Oct 14 2020 at 01:07)</a>:</h4>
<p>heh, I know a thing or two about that :P</p>



<a name="213236709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236709">(Oct 14 2020 at 01:08)</a>:</h4>
<p>I might also suggest integrating with rust-analyzer's LSP server instead, which should provided better usability and likely much higher correctness (at least over time)  than save-analysis</p>



<a name="213236711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236711">(Oct 14 2020 at 01:08)</a>:</h4>
<p>the rustdoc output doesn't describe code inside of function bodies, which is really what we need for this application</p>



<a name="213236713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236713">(Oct 14 2020 at 01:08)</a>:</h4>
<p>ugh, i need to bug @pineapple about that</p>



<a name="213236722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236722">(Oct 14 2020 at 01:08)</a>:</h4>
<p><span class="user-mention silent" data-user-id="210316">GuillaumeGomez</span> decided to block on a whole new test suite :/</p>



<a name="213236730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236730">(Oct 14 2020 at 01:08)</a>:</h4>
<p>tbh I would say "don't rely on save-analysis for new development", I think</p>



<a name="213236745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236745">(Oct 14 2020 at 01:09)</a>:</h4>
<p>that said, I do not think it likely that it will go away if we have people stepping up who are willing to maintain it for some time</p>



<a name="213236747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236747">(Oct 14 2020 at 01:09)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="210316">GuillaumeGomez</span> decided to block on a whole new test suite :/</p>
</blockquote>
<p>oh? I thought it was very close to landing.. but we can talk in another thread</p>



<a name="213236754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236754">(Oct 14 2020 at 01:09)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116883">tmandry</span> <a href="#narrow/stream/131828-t-compiler/topic/Future.20of.20save-analysis/near/213236711">said</a>:</p>
<blockquote>
<p>the rustdoc output doesn't describe code inside of function bodies, which is really what we need for this application</p>
</blockquote>
<p>right <a href="https://github.com/rust-lang/rfcs/pull/2963#issuecomment-669362885">https://github.com/rust-lang/rfcs/pull/2963#issuecomment-669362885</a></p>



<a name="213236827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236827">(Oct 14 2020 at 01:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> I would also emphasize that save-analysis is super likely to just ... miss things, etc. from my recollection</p>



<a name="213236845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236845">(Oct 14 2020 at 01:11)</a>:</h4>
<p>like, new features can easily just not get implemented for it (I think impl trait for a long time was basically ignored)</p>



<a name="213236850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236850">(Oct 14 2020 at 01:11)</a>:</h4>
<p>it's model is also not very precise iirc, though I last looked a while ago</p>



<a name="213236909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213236909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213236909">(Oct 14 2020 at 01:12)</a>:</h4>
<p>hm, okay. it sounds like we could limp along for quite awhile, but will want to invest in a better solution in the meantime. e.g. libraryification with enough of a stable API to write a kythe indexer.</p>



<a name="213288842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213288842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213288842">(Oct 14 2020 at 13:37)</a>:</h4>
<p>From my perspective:</p>
<ul>
<li>There's strong architectural desire to remove save-analysis, it is perceived as a dead-end, which will be eventually removed.  </li>
<li>At the same time, maintenance burden is not that high (with the caveat that the quality is not really production ready).</li>
<li>There's a vague desire to some day have something a-la save-analysis 2.0 -- exposing data-shaped API from the compiler to allow looking at the fully type-checked and analyzed code</li>
<li>rust-analyzer is in theory the path towards that goal. The high-investment / high-risk / high-return option is to build Kythe indexer on top of rust-analyzer. But, ra and the whole library-ification thing is still very expeimental, so "build on top" kind of includes "build foudnation" as well</li>
</ul>



<a name="213329371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213329371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213329371">(Oct 14 2020 at 18:00)</a>:</h4>
<p>I use save-analysis for warnalyzer atm. I'm considering adopting <code>rust-analyzer</code> but from what I read it's not meant to support bulk data mode but queries instead.</p>



<a name="213329631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213329631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213329631">(Oct 14 2020 at 18:02)</a>:</h4>
<p>warnalyzer needs bulk data mode, as in, a graph of usage relationships of all items in a crate and crate graph.</p>



<a name="213330709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213330709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213330709">(Oct 14 2020 at 18:10)</a>:</h4>
<p>Ultimately, <code>rust-analyzer</code> should handle both batch and lazy scenarios, or we would need to maintain rustc and rust-analyzer in parallel in perpetuity.  And it is indeed not-trivial to support both efficiently. "what are the usages of symbol <code>x</code>" is the operation that is implemented very differently in two modes. </p>
<p>At the moment, rust-analyzer is indeed geared towards lazy scenario, proving out feasibility of batch analysis is what "build foundation" is about :)</p>



<a name="213481289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213481289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213481289">(Oct 15 2020 at 20:13)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> Yeah, fwiw I had originally encouraged them to look into building atop rust-analyzer. Their response was that LSPs generally don't have enough information for <a href="https://kythe.io/docs/schema/">everything they want to expose</a>, and that a cursory glance confirmed this.</p>



<a name="213481308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213481308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213481308">(Oct 15 2020 at 20:13)</a>:</h4>
<p>The kythe indexer is also offline/batch mode</p>



<a name="213481405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213481405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213481405">(Oct 15 2020 at 20:14)</a>:</h4>
<p>I'm sure that in time things will converge, but it was hard to make a pitch for "here's the thing we <em>eventually</em> want to use, but it doesn't do what you want yet and none of the APIs are stable either"</p>



<a name="213481686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213481686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213481686">(Oct 15 2020 at 20:17)</a>:</h4>
<p>For that use case "perfect but (potentially) slow" is the tradeoff you want to make, and the main issue I see in rust-analyzer is that the name resolution is not always accurate</p>



<a name="213481731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213481731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213481731">(Oct 15 2020 at 20:18)</a>:</h4>
<p>So for those reasons I can see why they went with save-analysis</p>



<a name="213481896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213481896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213481896">(Oct 15 2020 at 20:19)</a>:</h4>
<p>Yeah, I agree with that reasoning, with a small correction that you don't <em>need</em> to use rust-analyzer via LSP protocol, and it's internal model has more or less everything</p>



<a name="213482121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Future%20of%20save-analysis/near/213482121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Future.20of.20save-analysis.html#213482121">(Oct 15 2020 at 20:21)</a>:</h4>
<p>Hmm yeah, I understand that but not sure if the kythe team did. I'm not sure what exactly they looked at to say it didn't have enough information.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>